package com.smartEdu.controller.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.smartEdu.commons.enums.RespCodeEnum;
import com.smartEdu.commons.resp.RespBody;
import com.smartEdu.service.impl.web.ExamPaperServiceImpl;

@Controller
@RequestMapping(value="web")
public class ExamPaperController {
	@Autowired
	private ExamPaperServiceImpl examService;
	
	@RequestMapping(value="myexampk",method=RequestMethod.GET)
	@ResponseBody
	public RespBody getPkByCreator(@RequestParam(value="uid") String uid) {
		RespBody respBody = new RespBody();
		if(uid == null) {
			respBody.add(RespCodeEnum.ERROR.getCode(), "用户ID不能为空");
		}
		examService.getExamPaperSummary(respBody, uid);
		return respBody;
	}
}
